import { useMediaQuery } from '@vueuse/core'

export function useIsPC() {
	// const isPc = ref(isPC())
	// const mediaQuery = window.matchMedia('(min-width: 1024px)')
	// const updateIsPC = (e) => {
	// 	console.log('updateIsPC', e)
	// 	return (isPc.value = isPC())
	// }
	// mediaQuery.addEventListener('change', updateIsPC)
	// onMounted(() => mediaQuery.addEventListener('change', updateIsPC))
	// onUnmounted(() => mediaQuery.removeEventListener('change', updateIsPC))
	return useMediaQuery('(min-width: 768px)')
}

export const isDesktop = useIsPC()
